<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JavaScript日期工具类</title>
<script type="text/javascript" src="../js/jquery/jquery.js"></script>
<script type="text/javascript" src="../js/tools/date/DateUtil.js"></script>
<script type="text/javascript">
onload = function(){
	var dateDIV = $("#dateDIV");
	dateDIV.html("当前时间[默认格式]: " + dateUtil.getDate());
	dateDIV.append("<br/>当前时间戳: " + dateUtil.getTime());
	dateDIV.append("<br/>指定格式的时间[默认格式]: " + dateUtil.getFormatDate(new Date(), "yyyy-MM-dd HH:mm:ss"));
	dateDIV.append("<br/>指定格式的时间[HH]: " + dateUtil.getFormatDate(new Date(), "HH"));
	dateDIV.append("<br/>将字符串时间转为Date: " + dateUtil.getFormatDate( dateUtil.format("2012-08-11 17:30:22", "yyyy-MM-dd HH:mm:ss"), "yyyy-MM-dd HH:mm:ss"));

	//时间处理
	dateUtil.clock("clock");
}
</script>
</head>
<body>
	<div id="dateDIV"></div>
	<div>时间: <label id="clock"></label></div>
</body>
</html>